package com.fit.pages.client;

import org.apache.tapestry5.annotations.InjectPage;
import org.apache.tapestry5.annotations.Persist;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.ioc.annotations.Inject;

import com.fit.annotations.AdminAccess;
import com.fit.annotations.UserAccess;
import com.fit.dao.client.ClientDAO;
import com.fit.entities.Client;

@UserAccess
@AdminAccess
public class Details {

	@Property
	@Persist
	private Client client;
	
	@Inject
	private ClientDAO clientDAO;

	Object onActivate(String personalId) {
		client = clientDAO.findByPersonalId(personalId);
		return null;
	}

}
